package org.batatasframework.support.charts;

public class ChartValueMatcher {
	
//	/** 满足的值 */
//	boolean match(Object value);
//	
//	/** 比较器的名称 */
//	String getName();

	private final String name;
	private final Object value;
	
	public ChartValueMatcher(String name){
		this.name = name;
		this.value = name;
	}

	public ChartValueMatcher(String name, Object value){
		this.name = name;
		this.value = value;
	}
	
//	@Override
	public String getName() {
		return name;
	}

//	@Override
	public boolean match(Object val) {
		return value.equals(val);
	}

	@Override
	public boolean equals(Object obj) {
		return match(obj);
	}
}
